﻿using System;
namespace LF.Common
{
	public class AppUtil
	{
		public static DateOnly CurrentDate => DateOnly.FromDateTime(DateTime.Now);

        /// <summary>
        /// 自动生成编码：当前日期 + guid
        /// </summary>
        public static string GrgeneratedNumber => CurrentDate.ToString("yyyyMMdd") + Guid.NewGuid().ToString("N");
        /// <summary>
        /// 自动生成编码：guid
        /// </summary>
        public static string GrgeneratedNumber2 => Guid.NewGuid().ToString("N");
        /// <summary>
        /// 自动生成编码：日期精确到千分之一秒
        /// </summary>
        public static string GrgeneratedNumber3 => DateTime.Now.ToString("yyyyMMddHHmmfff");
        /// <summary>
        /// 2099-12-31
        /// </summary>
        public static DateOnly MaxDate => new DateOnly(2099,12,31);
    }
}

